package com.qiaoan.back.service.sys.impl;

import com.qiaoan.back.dao.sys.UserDao;
import com.qiaoan.back.model.sys.UserModel;
import com.qiaoan.back.service.sys.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService{

    @Autowired
    private UserDao dao ;

    /**
     * @param user
     * @return
     */
    @Override
    public int insert(UserModel user) {

        return dao.insert(user);
    }

    /**
     *
     * @param username
     * @param password
     * @return
     */
    @Override
    public UserModel getUserByNamePwd(String username ,String password) {
        return dao.getUserByNamePwd(username, password);
    }

    /**
     * @param username
     * @return
     */
    @Override
    public UserModel getUserByUsername(String username) {
        return dao.getUserByUsername(username);
    }
}
